const {
    ServiceType,
    appendServices
} = require("./base");
const config = require('../config');

const routers = {
    "/task/add": ServiceType(),
    "/task/del": ServiceType(),
    "/task/up": ServiceType(),
    "/task/all": ServiceType(),
    "/task/:id": ServiceType(),
}

init();
module.exports = routers;
function init(){
    let services = {};
    createServices(services);

    appendServices(routers, services);
}
function createServer(services){
    services["/task/add"] = function(req, res, body) {
        
    }
    services["/task/del"] = function(req, res, body) {
        removeTask(id, true);
    }
    services["/task/up"] = function(req, res, body) {

    }
    services["/task/all"] = function(req, res, body) {

    }
    services["/task/:id"] = function(req, res, body) {
        let id = req.params.id;
    }
}